 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

数据计算服务API
数据计算服务相关API

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKXdata/XdataExecutor.h>

@implementation XdataClient

@synthesize userAgent = _userAgent;
@synthesize serviceName = _serviceName;
@synthesize version = _version;

-(void) addCustomerHeaderWithKey:(NSString*) key
                           value:(NSString*) value{
    if(![self customHeader])
    {
        self.customHeader = [[NSMutableDictionary alloc] init];
    }
    if(key && value)
    {
        [[self customHeader] setValue:value forKey:key];
    }
   
}

-(id)initWithGlobalConfig{
    if(![GlobalConfig credential])
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@"GlobalConfig credential not config" userInfo:nil];
        @throw e;
    }
    self.credential = [GlobalConfig credential];
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"xdata.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 xdata  v1";
    _serviceName = @"xdata";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
         sdkEnvironment:(SDKEnvironment*)sdkEnvironment
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    
    if(!sdkEnvironment)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" sdkEnvironment can not null" userInfo:nil];
        @throw e;
    }else{
        self.sdkEnvironment = sdkEnvironment;
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 xdata  v1";
    _serviceName = @"xdata";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"xdata.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 xdata  v1";
    _serviceName = @"xdata";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)init{
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 xdata  v1";
    _serviceName = @"xdata";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}


/**
cancelRasQuery sync request
@param cancelRasQueryRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelRasQueryResponse` the request response data model
*/
-(NSDictionary*) cancelRasQuerySyncWithRequest:(XdataCancelRasQueryRequest*) cancelRasQueryRequest
{
XdataCancelRasQueryExecutor* excutor = [[XdataCancelRasQueryExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:cancelRasQueryRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCancelRasQueryResponse* response = [[XdataCancelRasQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"cancelRasQueryResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)cancelRasQueryAsyncWithRequest:(XdataCancelRasQueryRequest*) cancelRasQueryRequest
                       completionHandler:(void(^)(int statusCode,XdataCancelRasQueryResponse* _Nullable cancelRasQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataCancelRasQueryExecutor* excutor = [[XdataCancelRasQueryExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:cancelRasQueryRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCancelRasQueryResponse* response = [[XdataCancelRasQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createDatabase sync request
@param createDatabaseRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createDatabaseResponse` the request response data model
*/
-(NSDictionary*) createDatabaseSyncWithRequest:(XdataCreateDatabaseRequest*) createDatabaseRequest
{
XdataCreateDatabaseExecutor* excutor = [[XdataCreateDatabaseExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createDatabaseRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCreateDatabaseResponse* response = [[XdataCreateDatabaseResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createDatabaseResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createDatabaseAsyncWithRequest:(XdataCreateDatabaseRequest*) createDatabaseRequest
                       completionHandler:(void(^)(int statusCode,XdataCreateDatabaseResponse* _Nullable createDatabaseResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataCreateDatabaseExecutor* excutor = [[XdataCreateDatabaseExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createDatabaseRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCreateDatabaseResponse* response = [[XdataCreateDatabaseResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getPySparkExecuteState sync request
@param getPySparkExecuteStateRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getPySparkExecuteStateResponse` the request response data model
*/
-(NSDictionary*) getPySparkExecuteStateSyncWithRequest:(XdataGetPySparkExecuteStateRequest*) getPySparkExecuteStateRequest
{
XdataGetPySparkExecuteStateExecutor* excutor = [[XdataGetPySparkExecuteStateExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getPySparkExecuteStateRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetPySparkExecuteStateResponse* response = [[XdataGetPySparkExecuteStateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getPySparkExecuteStateResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getPySparkExecuteStateAsyncWithRequest:(XdataGetPySparkExecuteStateRequest*) getPySparkExecuteStateRequest
                       completionHandler:(void(^)(int statusCode,XdataGetPySparkExecuteStateResponse* _Nullable getPySparkExecuteStateResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetPySparkExecuteStateExecutor* excutor = [[XdataGetPySparkExecuteStateExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getPySparkExecuteStateRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetPySparkExecuteStateResponse* response = [[XdataGetPySparkExecuteStateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
listDatabaseInfo sync request
@param listDatabaseInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listDatabaseInfoResponse` the request response data model
*/
-(NSDictionary*) listDatabaseInfoSyncWithRequest:(XdataListDatabaseInfoRequest*) listDatabaseInfoRequest
{
XdataListDatabaseInfoExecutor* excutor = [[XdataListDatabaseInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:listDatabaseInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListDatabaseInfoResponse* response = [[XdataListDatabaseInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"listDatabaseInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)listDatabaseInfoAsyncWithRequest:(XdataListDatabaseInfoRequest*) listDatabaseInfoRequest
                       completionHandler:(void(^)(int statusCode,XdataListDatabaseInfoResponse* _Nullable listDatabaseInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataListDatabaseInfoExecutor* excutor = [[XdataListDatabaseInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:listDatabaseInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListDatabaseInfoResponse* response = [[XdataListDatabaseInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getDatabaseInfo sync request
@param getDatabaseInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getDatabaseInfoResponse` the request response data model
*/
-(NSDictionary*) getDatabaseInfoSyncWithRequest:(XdataGetDatabaseInfoRequest*) getDatabaseInfoRequest
{
XdataGetDatabaseInfoExecutor* excutor = [[XdataGetDatabaseInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getDatabaseInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetDatabaseInfoResponse* response = [[XdataGetDatabaseInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getDatabaseInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getDatabaseInfoAsyncWithRequest:(XdataGetDatabaseInfoRequest*) getDatabaseInfoRequest
                       completionHandler:(void(^)(int statusCode,XdataGetDatabaseInfoResponse* _Nullable getDatabaseInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetDatabaseInfoExecutor* excutor = [[XdataGetDatabaseInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getDatabaseInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetDatabaseInfoResponse* response = [[XdataGetDatabaseInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
listTableInfo sync request
@param listTableInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listTableInfoResponse` the request response data model
*/
-(NSDictionary*) listTableInfoSyncWithRequest:(XdataListTableInfoRequest*) listTableInfoRequest
{
XdataListTableInfoExecutor* excutor = [[XdataListTableInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:listTableInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListTableInfoResponse* response = [[XdataListTableInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"listTableInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)listTableInfoAsyncWithRequest:(XdataListTableInfoRequest*) listTableInfoRequest
                       completionHandler:(void(^)(int statusCode,XdataListTableInfoResponse* _Nullable listTableInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataListTableInfoExecutor* excutor = [[XdataListTableInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:listTableInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListTableInfoResponse* response = [[XdataListTableInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getRasQueryState sync request
@param getRasQueryStateRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryStateResponse` the request response data model
*/
-(NSDictionary*) getRasQueryStateSyncWithRequest:(XdataGetRasQueryStateRequest*) getRasQueryStateRequest
{
XdataGetRasQueryStateExecutor* excutor = [[XdataGetRasQueryStateExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getRasQueryStateRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryStateResponse* response = [[XdataGetRasQueryStateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getRasQueryStateResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getRasQueryStateAsyncWithRequest:(XdataGetRasQueryStateRequest*) getRasQueryStateRequest
                       completionHandler:(void(^)(int statusCode,XdataGetRasQueryStateResponse* _Nullable getRasQueryStateResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetRasQueryStateExecutor* excutor = [[XdataGetRasQueryStateExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getRasQueryStateRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryStateResponse* response = [[XdataGetRasQueryStateResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
executeRasQuery sync request
@param executeRasQueryRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `executeRasQueryResponse` the request response data model
*/
-(NSDictionary*) executeRasQuerySyncWithRequest:(XdataExecuteRasQueryRequest*) executeRasQueryRequest
{
XdataExecuteRasQueryExecutor* excutor = [[XdataExecuteRasQueryExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:executeRasQueryRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataExecuteRasQueryResponse* response = [[XdataExecuteRasQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"executeRasQueryResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)executeRasQueryAsyncWithRequest:(XdataExecuteRasQueryRequest*) executeRasQueryRequest
                       completionHandler:(void(^)(int statusCode,XdataExecuteRasQueryResponse* _Nullable executeRasQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataExecuteRasQueryExecutor* excutor = [[XdataExecuteRasQueryExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:executeRasQueryRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataExecuteRasQueryResponse* response = [[XdataExecuteRasQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
cancelPySparkJob sync request
@param cancelPySparkJobRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `cancelPySparkJobResponse` the request response data model
*/
-(NSDictionary*) cancelPySparkJobSyncWithRequest:(XdataCancelPySparkJobRequest*) cancelPySparkJobRequest
{
XdataCancelPySparkJobExecutor* excutor = [[XdataCancelPySparkJobExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:cancelPySparkJobRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCancelPySparkJobResponse* response = [[XdataCancelPySparkJobResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"cancelPySparkJobResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)cancelPySparkJobAsyncWithRequest:(XdataCancelPySparkJobRequest*) cancelPySparkJobRequest
                       completionHandler:(void(^)(int statusCode,XdataCancelPySparkJobResponse* _Nullable cancelPySparkJobResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataCancelPySparkJobExecutor* excutor = [[XdataCancelPySparkJobExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:cancelPySparkJobRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCancelPySparkJobResponse* response = [[XdataCancelPySparkJobResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getPySparkExecuteResult sync request
@param getPySparkExecuteResultRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getPySparkExecuteResultResponse` the request response data model
*/
-(NSDictionary*) getPySparkExecuteResultSyncWithRequest:(XdataGetPySparkExecuteResultRequest*) getPySparkExecuteResultRequest
{
XdataGetPySparkExecuteResultExecutor* excutor = [[XdataGetPySparkExecuteResultExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getPySparkExecuteResultRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetPySparkExecuteResultResponse* response = [[XdataGetPySparkExecuteResultResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getPySparkExecuteResultResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getPySparkExecuteResultAsyncWithRequest:(XdataGetPySparkExecuteResultRequest*) getPySparkExecuteResultRequest
                       completionHandler:(void(^)(int statusCode,XdataGetPySparkExecuteResultResponse* _Nullable getPySparkExecuteResultResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetPySparkExecuteResultExecutor* excutor = [[XdataGetPySparkExecuteResultExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getPySparkExecuteResultRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetPySparkExecuteResultResponse* response = [[XdataGetPySparkExecuteResultResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
listInstanceInfo sync request
@param listInstanceInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `listInstanceInfoResponse` the request response data model
*/
-(NSDictionary*) listInstanceInfoSyncWithRequest:(XdataListInstanceInfoRequest*) listInstanceInfoRequest
{
XdataListInstanceInfoExecutor* excutor = [[XdataListInstanceInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:listInstanceInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListInstanceInfoResponse* response = [[XdataListInstanceInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"listInstanceInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)listInstanceInfoAsyncWithRequest:(XdataListInstanceInfoRequest*) listInstanceInfoRequest
                       completionHandler:(void(^)(int statusCode,XdataListInstanceInfoResponse* _Nullable listInstanceInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataListInstanceInfoExecutor* excutor = [[XdataListInstanceInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:listInstanceInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataListInstanceInfoResponse* response = [[XdataListInstanceInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteDatabase sync request
@param deleteDatabaseRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteDatabaseResponse` the request response data model
*/
-(NSDictionary*) deleteDatabaseSyncWithRequest:(XdataDeleteDatabaseRequest*) deleteDatabaseRequest
{
XdataDeleteDatabaseExecutor* excutor = [[XdataDeleteDatabaseExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteDatabaseRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataDeleteDatabaseResponse* response = [[XdataDeleteDatabaseResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteDatabaseResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteDatabaseAsyncWithRequest:(XdataDeleteDatabaseRequest*) deleteDatabaseRequest
                       completionHandler:(void(^)(int statusCode,XdataDeleteDatabaseResponse* _Nullable deleteDatabaseResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataDeleteDatabaseExecutor* excutor = [[XdataDeleteDatabaseExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteDatabaseRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataDeleteDatabaseResponse* response = [[XdataDeleteDatabaseResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getTableInfo sync request
@param getTableInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getTableInfoResponse` the request response data model
*/
-(NSDictionary*) getTableInfoSyncWithRequest:(XdataGetTableInfoRequest*) getTableInfoRequest
{
XdataGetTableInfoExecutor* excutor = [[XdataGetTableInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getTableInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetTableInfoResponse* response = [[XdataGetTableInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getTableInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getTableInfoAsyncWithRequest:(XdataGetTableInfoRequest*) getTableInfoRequest
                       completionHandler:(void(^)(int statusCode,XdataGetTableInfoResponse* _Nullable getTableInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetTableInfoExecutor* excutor = [[XdataGetTableInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getTableInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetTableInfoResponse* response = [[XdataGetTableInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
executePySparkQuery sync request
@param executePySparkQueryRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `executePySparkQueryResponse` the request response data model
*/
-(NSDictionary*) executePySparkQuerySyncWithRequest:(XdataExecutePySparkQueryRequest*) executePySparkQueryRequest
{
XdataExecutePySparkQueryExecutor* excutor = [[XdataExecutePySparkQueryExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:executePySparkQueryRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataExecutePySparkQueryResponse* response = [[XdataExecutePySparkQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"executePySparkQueryResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)executePySparkQueryAsyncWithRequest:(XdataExecutePySparkQueryRequest*) executePySparkQueryRequest
                       completionHandler:(void(^)(int statusCode,XdataExecutePySparkQueryResponse* _Nullable executePySparkQueryResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataExecutePySparkQueryExecutor* excutor = [[XdataExecutePySparkQueryExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:executePySparkQueryRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataExecutePySparkQueryResponse* response = [[XdataExecutePySparkQueryResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getRasQueryResult sync request
@param getRasQueryResultRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryResultResponse` the request response data model
*/
-(NSDictionary*) getRasQueryResultSyncWithRequest:(XdataGetRasQueryResultRequest*) getRasQueryResultRequest
{
XdataGetRasQueryResultExecutor* excutor = [[XdataGetRasQueryResultExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getRasQueryResultRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryResultResponse* response = [[XdataGetRasQueryResultResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getRasQueryResultResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getRasQueryResultAsyncWithRequest:(XdataGetRasQueryResultRequest*) getRasQueryResultRequest
                       completionHandler:(void(^)(int statusCode,XdataGetRasQueryResultResponse* _Nullable getRasQueryResultResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetRasQueryResultExecutor* excutor = [[XdataGetRasQueryResultExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getRasQueryResultRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryResultResponse* response = [[XdataGetRasQueryResultResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createTable sync request
@param createTableRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createTableResponse` the request response data model
*/
-(NSDictionary*) createTableSyncWithRequest:(XdataCreateTableRequest*) createTableRequest
{
XdataCreateTableExecutor* excutor = [[XdataCreateTableExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createTableRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCreateTableResponse* response = [[XdataCreateTableResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createTableResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createTableAsyncWithRequest:(XdataCreateTableRequest*) createTableRequest
                       completionHandler:(void(^)(int statusCode,XdataCreateTableResponse* _Nullable createTableResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataCreateTableExecutor* excutor = [[XdataCreateTableExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createTableRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataCreateTableResponse* response = [[XdataCreateTableResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
getRasQueryLog sync request
@param getRasQueryLogRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `getRasQueryLogResponse` the request response data model
*/
-(NSDictionary*) getRasQueryLogSyncWithRequest:(XdataGetRasQueryLogRequest*) getRasQueryLogRequest
{
XdataGetRasQueryLogExecutor* excutor = [[XdataGetRasQueryLogExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:getRasQueryLogRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryLogResponse* response = [[XdataGetRasQueryLogResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"getRasQueryLogResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)getRasQueryLogAsyncWithRequest:(XdataGetRasQueryLogRequest*) getRasQueryLogRequest
                       completionHandler:(void(^)(int statusCode,XdataGetRasQueryLogResponse* _Nullable getRasQueryLogResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataGetRasQueryLogExecutor* excutor = [[XdataGetRasQueryLogExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:getRasQueryLogRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataGetRasQueryLogResponse* response = [[XdataGetRasQueryLogResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteTable sync request
@param deleteTableRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteTableResponse` the request response data model
*/
-(NSDictionary*) deleteTableSyncWithRequest:(XdataDeleteTableRequest*) deleteTableRequest
{
XdataDeleteTableExecutor* excutor = [[XdataDeleteTableExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteTableRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataDeleteTableResponse* response = [[XdataDeleteTableResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteTableResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteTableAsyncWithRequest:(XdataDeleteTableRequest*) deleteTableRequest
                       completionHandler:(void(^)(int statusCode,XdataDeleteTableResponse* _Nullable deleteTableResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
XdataDeleteTableExecutor* excutor = [[XdataDeleteTableExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteTableRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    XdataDeleteTableResponse* response = [[XdataDeleteTableResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}


 /**
 xdata common sync request
 @param  jdcloudDataRequest request param
 @return key `statusCode` http request status code type is int
             `dataResult` the http request response data  type is NSData
             `requestError` the request error type is NSError
 */
 -(NSDictionary*) xdataCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                                   url:(NSString*) url
                                                method:(NSString*) method{
    CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    NSDictionary* responseResult = [excutor executeDataSync:jdcloudDataRequest];
    return responseResult;
}

-(void)xdataCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                         url:(NSString*) url
                                      method:(NSString*) method
                           completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
     CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    
    [excutor executeDataAsync:jdcloudDataRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        completionHandler(statusCode,responseData,error);
    }];
} 

@end
